package com.bulletelc.apollopre.module.main;

import com.bulletelc.apollopre.framework.IModel;
import com.bulletelc.apollopre.framework.BasePresenter;
import com.bulletelc.apollopre.framework.IView;

/**
 * author: lhl
 * date  : 2017/11/09
 * desc  : TODO
 */

public interface MainContract {

    interface View extends IView {

        void showUpdateDialog();

        void onLoadingStart();

        void onLoadingFinish();

        void onLoadingError(Object error);

        void showLoadingProgress(long downloadLength,long totalLength,float fraction);

    }

    abstract class Presenter extends BasePresenter<View> {

        abstract void checkVersion();

        abstract void downloadAPK();

    }

    interface Model extends IModel {

        void checkVersion(AsyncCallback callback);

        void downloadAPK(MainModelCallback callback);
    }

    interface MainModelCallback extends IModel.AsyncCallback {

        void onStart();

        void onFinish();

        void downloadProgress(long downloadLength,long totalLength,float fraction);
    }



}
